package com.mj.listen1._13_优先级队列;

import com.mj.listen1._13_优先级队列.queue.PriorityQueue;

public class Main {
    public static void main(String[] args) {
        PriorityQueue<Person> priorityQueue = new PriorityQueue<>();
        priorityQueue.enQueue(new Person("Jack", 10));
        priorityQueue.enQueue(new Person("Rose", 5));
        priorityQueue.enQueue(new Person("Li", 15));
        priorityQueue.enQueue(new Person("LBJ", 3));
        priorityQueue.enQueue(new Person("Cobe", 1));
        priorityQueue.enQueue(new Person("howard", 8));
        while (!priorityQueue.isEmpty()) {
            System.out.println(priorityQueue.deQueue());
        }
    }
}
